//等级升级
(function () {
    var io = ppt.io;
    function upgrade () {
        upgrade.super(this);
        this.width     = 1334;
        this.height    = Laya.stage.height;

        this.isUpgrade = null;
        this.init();
    }
    //继承
    Laya.class(upgrade, "Alert.Upgrade", Laya.Sprite);

    var _proto = upgrade.prototype;
    _proto.destroy = function () {
       
        Laya.Sprite.prototype.destroy.call(this, true);
        this.isUpgrade = null;
    }
    //初始化
    _proto.init = function () {
        var isUpgrade = utils.createSkeleton("res/alert/star/star");
        this.isUpgrade = isUpgrade;
        this.addChild(isUpgrade);
        isUpgrade.pos(667,400);
        isUpgrade.play("star", false);
        isUpgrade.once(Laya.Event.STOPPED, this, function () {
            Laya.timer.callLater(this, function () {
                this.destroy();
            })
        }); 
    }
})();
